<?php

namespace Gnway\Ticket\Rest\Annotation;

use Doctrine\Common\Annotations\Annotation\Target;
use Doctrine\Common\Annotations\Annotation\Attribute;
use Doctrine\Common\Annotations\Annotation\Attributes;

/**
 * Version Annotation
 *
 * @Annotation
 * @Target("CLASS")
 * @Attributes({
 *     @Attribute("value", type="string", required=false),
 * })
 * @author zushaolong
 * @mail zushaolong@gmail.com
 */
final class Version
{

  /**
   * Version value
   *
   * @var string
   */
  private string $value = '';

  /**
   * Version constructor.
   *
   * @param array $values
   */
  public function __construct(array $values)
  {
    if (isset($values['value'])) {
      $this->value = (string)$values['value'];
    }
  }

  /**
   * @return string
   */
  public function getValue(): string
  {
    return $this->value;
  }
}